<?php

/*
 * [HZTCcms] (C)2001-2018 AoSheWeb Inc.
 * This is NOT a freeware, use is subject to license terms.
 * 
 * Document   : IndexAction.class.php
 * Encoding   : UTF-8
 * Created on : 2011-11-23, 16:11:25
 * Author     : leefire yunzhi.li.08@gmail.com 464328282
 * Site       : http://www.aosheweb.com
 * Description: 
 */

class IndexAction extends CommonAction {
    /*
     * 后台管理首页
     * @access	public
     * @param	void
     * @return	void
     */

    public function index() {
	$index = new Model();
	$indexUrl = U('App://Www-Index/index');
	$this->assign('indexUrl', $indexUrl);
	$changePwUrl = U("App://Admin-Public/password");
	$this->assign('changePwUrl', $changePwUrl);
	$logoutUrl = U("App://Admin-Public/logout");
	$this->assign('logoutUrl', $logoutUrl);
	$getMysqlVersion = $index->query('select version()');
	$info = array(
	    '主机域名/IP：' => $_SERVER['SERVER_NAME'] . ' [ ' . gethostbyname($_SERVER['SERVER_NAME']) . ' ]',
	    '服务器运行环境：' => $_SERVER['SERVER_SOFTWARE'],
	    '服务器平台：' => PHP_OS,
	    'PHP版本：' => PHP_VERSION,
	    '最大上传许可：' => ini_get('file_uploads') ? ini_get('upload_max_filesize') : '禁止上传',
	    '最大执行时间限制：' => ini_get('max_execution_time') . ' 秒',
	    '最大内存限制：' => ini_get('memory_limit'),
	    '魔术引号：' => get_magic_quotes_gpc() ? '开启' : '关闭',
	    '系统当前使用内存：' => function_exists('memory_get_usage') ? byte_format(memory_get_usage()) : '未知',
	    'MySQL版本：' => $getMysqlVersion[0]['version()'],
	);
	$this->assign('info', $info);
	// 服务器日期
	$arrWeekday = array(0 => '星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六');
	$weeknum = date("w", time());
	$data['serverDate'] = date("Y年m月d日", time()) . '  ' . $arrWeekday[$weeknum];

	$this->assign('data', $data);

	$this->display();
    }

}

?>
